package com.hgkj.cloud.base.dao;

import com.hgkj.cloud.base.domain.SysTenants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysTenantsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysTenants record);

    int insertSelective(SysTenants record);

    SysTenants selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysTenants record);

    int updateByPrimaryKey(SysTenants record);

    SysTenants getTenantByCode(String code);

    SysTenants getTenantInfo(Map<String,Object> map);

    List<SysTenants> listTenants(Map<String,Object> map);

    List<SysTenants> listAllTenants();

    List<SysTenants> listSearchTenants(Map<String, Object> map);

    List<SysTenants> listSonTenants(Long father_id);

    Long listAllTenantsCount(Map<String, Object> map);

    Long findAddTenantsCount(Map<String, Object> map);

    List<SysTenants> listAllSystemTenants(Map<String, Object> map);

    SysTenants findTopTenant();

    int disableTenant(Long id);

    int enalbeTenant(SysTenants record);

    List<SysTenants> backendGetListSonTenant(Long father_id);

    SysTenants getSimpleTenantById(Long id);

    // base begin
    SysTenants getTenantById(@Param("id")Long id);

    SysTenants getTenantByIds(@Param("id")Long tenant_id);

    List<SysTenants> getAllTenant();
    SysTenants getTenantByCodes(@Param("code") String code);

    //4a
    void deleteEnabledUser();
    void deleteEnabledTenants ();
    void deleteEnabledFramework ();
    int updateTenantCreateDate(@Param("id") String string);
    int deleteTenantCreateDate();

    //base end

    List<SysTenants> listDataByMap(Map<String, Object> map);
}